<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >{$configpub['name_coin']}充值记录列表</a></li>
		</ul>
		<form class="well form-inline margin-top-20" name="form1" method="post" action="">
            订单状态：
            <select class="form-control" name="status">
				<option value="">全部</option>
                <volist name="status" id="v">
                    <option value="{$key}" <if condition="input('request.status') neq '' && input('request.status') eq $key">selected</if>>{$v}</option>
                </volist>
			</select>

			提交时间：
			<input class="form-control js-bootstrap-date" name="start_time" id="start_time" autocomplete="off" value="{:input('request.start_time')}" aria-invalid="false" style="width: 110px;"> - 
            <input class="form-control js-bootstrap-date" name="end_time" id="end_time" autocomplete="off" value="{:input('request.end_time')}" aria-invalid="false" style="width: 110px;">
            用户ID：
            <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
                   placeholder="请输入用户ID">
			关键字： 
            <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
                   placeholder="请输入订单号">
            <input type="button" class="btn btn-primary" value="搜索" onclick="form1.action='{:url('Charge/index')}';form1.submit();"/>
			<input type="button" class="btn btn-success" value="导出" onclick="form1.action='{:url('Charge/export')}';form1.submit();"/>	
            
			<div style="margin-top:10px">
				人民币金额统计：{$moneysum|default=0} 元 (根据筛选条件统计)
			</div>		
		</form>	
    	
		<form method="post" class="js-ajax-form" >
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>ID</th>
						<th>会员</th>
						<th>人民币金额</th>
						<th>兑换{$configpub['name_coin']}</th>
						<th>赠送{$configpub['name_coin']}</th>
						<th>商户订单号</th>
						<th>支付类型</th>
						<th>支付环境</th>
						<th>第三方支付订单号</th>
						<th>订单状态</th>
						<th>提交时间</th>
						<th>{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="lists" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo['userinfo']['user_nicename']} ({$vo['uid']})</td>	
						<td>{$vo['money']}</td>
						<td>{$vo['coin']}</td>
						<td>{$vo['coin_give']}</td>
						<td>{$vo['orderno']}</td>
						<td>{$type[$vo['type']]}</td>
						<td>{$ambient[$vo['type']][$vo['ambient']]}</td>
						<td>{$vo['trade_no']}</td>
						<td>{$status[$vo['status']]}</td>
						<td>{:date('Y-m-d H:i:s',$vo['addtime'])}</td>
						<td>	
                            <if condition="$vo['status'] eq 0 ">
                            <a class="btn btn-xs btn-danger js-ajax-dialog-btn" href="{:url('Charge/setPay',array('id'=>$vo['id']))}" >确认支付</a>
                            </if>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>